/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GUI.java
 *
 * Created on 06.07.2010, 12:02:05
 */

package wmauswertung;

import javax.swing.JOptionPane;

/**
 *
 * @author mcnanuschi
 */
public class GUI extends javax.swing.JFrame {

    private String version = "v0.4";
    /** Creates new form NewJFrame */
    public GUI() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        jDialog1 = new javax.swing.JDialog();
        button1 = new java.awt.Button();
        label1 = new java.awt.Label();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        tabelle = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        GroupA = new javax.swing.JPanel();
        Team1 = new javax.swing.JTextField();
        Team2 = new javax.swing.JTextField();
        Team3 = new javax.swing.JTextField();
        Team4 = new javax.swing.JTextField();
        M2_SH = new javax.swing.JTextField();
        M6_H = new javax.swing.JTextField();
        M6_G = new javax.swing.JTextField();
        M5_H = new javax.swing.JTextField();
        M5_G = new javax.swing.JTextField();
        M3_G = new javax.swing.JTextField();
        M4_G = new javax.swing.JTextField();
        M1_G = new javax.swing.JTextField();
        M2_G = new javax.swing.JTextField();
        M3_SH = new javax.swing.JTextField();
        M2_SG = new javax.swing.JTextField();
        M3_SG = new javax.swing.JTextField();
        M1_SH = new javax.swing.JTextField();
        M1_SG = new javax.swing.JTextField();
        M4_SH = new javax.swing.JTextField();
        M4_SG = new javax.swing.JTextField();
        M5_SH = new javax.swing.JTextField();
        M5_SG = new javax.swing.JTextField();
        M6_SH = new javax.swing.JTextField();
        M4_H = new javax.swing.JTextField();
        M6_SG = new javax.swing.JTextField();
        M1_H = new javax.swing.JTextField();
        M3_H = new javax.swing.JTextField();
        M2_H = new javax.swing.JTextField();
        refreshButton = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        gruppenTabelle = new javax.swing.JTable();
        setTeamButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        spielplan = new javax.swing.JPanel();
        canvas1 = new java.awt.Canvas();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        neu = new javax.swing.JMenuItem();
        oeffnen = new javax.swing.JMenuItem();
        schliessen = new javax.swing.JMenuItem();
        speichern = new javax.swing.JMenuItem();
        laden = new javax.swing.JMenuItem();
        beenden = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        info = new javax.swing.JMenuItem();

        button1.setActionCommand("OK");
        button1.setLabel("OK");

        label1.setText("Diese Progamm soll zum Unterstützung von Turnierauswertungen dienen.");

        org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(
            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jDialog1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, label1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(button1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jDialog1Layout.setVerticalGroup(
            jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jDialog1Layout.createSequentialGroup()
                .addContainerGap()
                .add(label1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(button1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Turnier-Auswertung");
        setLocation(new java.awt.Point(100, 100));

        tabelle.setName("tabelle"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {new Integer(1), null, null, null, null, null},
                {new Integer(2), null, null, null, null, null},
                {new Integer(3), null, null, null, null, null},
                {new Integer(4), null, null, null, null, null},
                {new Integer(5), null, null, null, null, null},
                {new Integer(6), null, null, null, null, null},
                {new Integer(7), null, null, null, null, null},
                {new Integer(8), null, null, null, null, null},
                {new Integer(9), null, null, null, null, null},
                {new Integer(10), null, null, null, null, null},
                {new Integer(11), null, null, null, null, null},
                {new Integer(12), null, null, null, null, null},
                {new Integer(13), null, null, null, null, null},
                {new Integer(14), null, null, null, null, null},
                {new Integer(15), null, null, null, null, null},
                {new Integer(16), null, null, null, null, null}
            },
            new String [] {
                "Platzierung", "Mannschaft", "Gruppe", "Spiele", "Torverhältnis", "Punkte"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class
            };

            @Override
            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        org.jdesktop.layout.GroupLayout tabelleLayout = new org.jdesktop.layout.GroupLayout(tabelle);
        tabelle.setLayout(tabelleLayout);
        tabelleLayout.setHorizontalGroup(
            tabelleLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 711, Short.MAX_VALUE)
        );
        tabelleLayout.setVerticalGroup(
            tabelleLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(tabelleLayout.createSequentialGroup()
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 282, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(104, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Tabelle", tabelle);

        Team1.setText("Team 1");

        Team2.setText("Team 2");

        Team3.setText("Team 3");

        Team4.setText("Team 4");

        M2_SH.setText("1");

        M6_H.setText("Team 2");
        M6_H.setEnabled(false);

        M6_G.setText("Team 3");
        M6_G.setEnabled(false);

        M5_H.setText("Team 1");
        M5_H.setEnabled(false);

        M5_G.setText("Team 4");
        M5_G.setEnabled(false);

        M3_G.setText("Team 3");
        M3_G.setEnabled(false);

        M4_G.setText("Team 4");
        M4_G.setEnabled(false);

        M1_G.setText("Team 2");
        M1_G.setEnabled(false);
        M1_G.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                M1_GActionPerformed(evt);
            }
        });

        M2_G.setText("Team 4");
        M2_G.setEnabled(false);

        M3_SH.setText("1");

        M2_SG.setText("0");

        M3_SG.setText("0");

        M1_SH.setText("1");

        M1_SG.setText("0");

        M4_SH.setText("1");

        M4_SG.setText("0");

        M5_SH.setText("1");

        M5_SG.setText("0");

        M6_SH.setText("1");

        M4_H.setText("Team 2");
        M4_H.setEnabled(false);

        M6_SG.setText("0");

        M1_H.setText("Team 1");
        M1_H.setEnabled(false);

        M3_H.setText("Team 1");
        M3_H.setEnabled(false);

        M2_H.setText("Team 3");
        M2_H.setEnabled(false);

        refreshButton.setText("Tabelle aktualisieren");
        refreshButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                refreshButtonActionPerformed(evt);
            }
        });

        gruppenTabelle.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {new Integer(1), null, null, null},
                {new Integer(2), null, null, null},
                {new Integer(3), null, null, null},
                {new Integer(4), null, null, null}
            },
            new String [] {
                "Platz", "Mannschaft", "Torverhältnis", "Punkte"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class
            };

            @Override
            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane2.setViewportView(gruppenTabelle);

        setTeamButton.setText("Teams setzen");

        jLabel1.setText("Gruppentabelle");

        jLabel2.setText("Mannschaftsnamen");

        jLabel3.setText("Begegnungen");

        jLabel4.setText("Ergebnis");

        org.jdesktop.layout.GroupLayout GroupALayout = new org.jdesktop.layout.GroupLayout(GroupA);
        GroupA.setLayout(GroupALayout);
        GroupALayout.setHorizontalGroup(
            GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(GroupALayout.createSequentialGroup()
                .addContainerGap()
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(GroupALayout.createSequentialGroup()
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(Team1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, Team2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                            .add(org.jdesktop.layout.GroupLayout.TRAILING, Team3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                            .add(Team4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                            .add(refreshButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                            .add(setTeamButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
                    .add(GroupALayout.createSequentialGroup()
                        .add(jLabel2)
                        .add(75, 75, 75)))
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2, 0, 0, Short.MAX_VALUE)
                        .add(GroupALayout.createSequentialGroup()
                            .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, M5_H, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, M6_H, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                    .add(M2_H, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                    .add(M3_H, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                    .add(M1_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .add(M4_H, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                                .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                .add(M6_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(M1_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(M2_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(M3_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(M4_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(M5_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 200, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                    .add(jLabel3))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel4)
                    .add(GroupALayout.createSequentialGroup()
                        .add(M6_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M6_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(GroupALayout.createSequentialGroup()
                        .add(M1_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M1_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(GroupALayout.createSequentialGroup()
                        .add(M2_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M2_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(GroupALayout.createSequentialGroup()
                        .add(M3_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M3_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(GroupALayout.createSequentialGroup()
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(M4_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M5_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(M5_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M4_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        GroupALayout.setVerticalGroup(
            GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, GroupALayout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel2)
                    .add(jLabel3)
                    .add(jLabel4))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(GroupALayout.createSequentialGroup()
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M1_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M1_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M2_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M2_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M3_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M3_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M4_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M4_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M5_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M5_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M6_SG, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M6_SH, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(GroupALayout.createSequentialGroup()
                        .add(M1_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M2_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M3_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M4_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M5_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M5_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(M6_G, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M6_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(GroupALayout.createSequentialGroup()
                        .add(M1_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M2_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(M3_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(GroupALayout.createSequentialGroup()
                        .add(Team1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(Team2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(Team3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(Team4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(M4_H, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(setTeamButton)))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel1)
                .add(7, 7, 7)
                .add(GroupALayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(refreshButton))
                .addContainerGap())
        );

        jTabbedPane1.addTab(" A ", GroupA);

        spielplan.setName("tabelle"); // NOI18N

        org.jdesktop.layout.GroupLayout spielplanLayout = new org.jdesktop.layout.GroupLayout(spielplan);
        spielplan.setLayout(spielplanLayout);
        spielplanLayout.setHorizontalGroup(
            spielplanLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(canvas1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 711, Short.MAX_VALUE)
        );
        spielplanLayout.setVerticalGroup(
            spielplanLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(canvas1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Spielplan", spielplan);

        jMenu1.setText("Datei");

        neu.setText("Neu");
        jMenu1.add(neu);

        oeffnen.setText("Oeffnen");
        jMenu1.add(oeffnen);

        schliessen.setText("Schliessen");
        jMenu1.add(schliessen);

        speichern.setText("Speichern");
        speichern.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                speichernActionPerformed(evt);
            }
        });
        jMenu1.add(speichern);

        laden.setText("Laden");
        jMenu1.add(laden);

        beenden.setText("Beenden");
        beenden.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                beendenActionPerformed(evt);
            }
        });
        jMenu1.add(beenden);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Bearbeiten");

        jMenuItem1.setText("Alles aktualisieren");
        jMenuItem1.setToolTipText("Damit bspw. nach dem Laden manuell alle Tabellen/Gruppen aktualisiert werden");
        jMenu2.add(jMenuItem1);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Hilfe");

        info.setText("Info");
        info.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                infoActionPerformed(evt);
            }
        });
        jMenu3.add(info);

        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 732, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>

    private void M1_GActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void beendenActionPerformed(java.awt.event.ActionEvent evt) {
        System.exit(0);
    }

    private void infoActionPerformed(java.awt.event.ActionEvent evt) {
        JOptionPane.showMessageDialog( null, "Programm für Tunrierauswertungen "+version+"\nAutoren:\n\tMaximilian Butterer\n\tRaoul Duczek\n\tMarcus Kaestner","Informationen",JOptionPane.INFORMATION_MESSAGE );
    }

    private void speichernActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {
        JOptionPane.showMessageDialog( null, this.getName().toString(), "Parent", JOptionPane.INFORMATION_MESSAGE);
    }

    /**
    * @param args the command line arguments
    */
    public void runGUI() {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new NewJFrameForGUITesting().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify
    private javax.swing.JPanel GroupA;
    private javax.swing.JTextField M1_G;
    private javax.swing.JTextField M1_H;
    private javax.swing.JTextField M1_SG;
    private javax.swing.JTextField M1_SH;
    private javax.swing.JTextField M2_G;
    private javax.swing.JTextField M2_H;
    private javax.swing.JTextField M2_SG;
    private javax.swing.JTextField M2_SH;
    private javax.swing.JTextField M3_G;
    private javax.swing.JTextField M3_H;
    private javax.swing.JTextField M3_SG;
    private javax.swing.JTextField M3_SH;
    private javax.swing.JTextField M4_G;
    private javax.swing.JTextField M4_H;
    private javax.swing.JTextField M4_SG;
    private javax.swing.JTextField M4_SH;
    private javax.swing.JTextField M5_G;
    private javax.swing.JTextField M5_H;
    private javax.swing.JTextField M5_SG;
    private javax.swing.JTextField M5_SH;
    private javax.swing.JTextField M6_G;
    private javax.swing.JTextField M6_H;
    private javax.swing.JTextField M6_SG;
    private javax.swing.JTextField M6_SH;
    private javax.swing.JTextField Team1;
    private javax.swing.JTextField Team2;
    private javax.swing.JTextField Team3;
    private javax.swing.JTextField Team4;
    private javax.swing.JMenuItem beenden;
    private java.awt.Button button1;
    private java.awt.Canvas canvas1;
    private javax.swing.JTable gruppenTabelle;
    private javax.swing.JMenuItem info;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable1;
    private java.awt.Label label1;
    private javax.swing.JMenuItem laden;
    private javax.swing.JMenuItem neu;
    private javax.swing.JMenuItem oeffnen;
    private javax.swing.JButton refreshButton;
    private javax.swing.JMenuItem schliessen;
    private javax.swing.JButton setTeamButton;
    private javax.swing.JMenuItem speichern;
    private javax.swing.JPanel spielplan;
    private javax.swing.JPanel tabelle;
    // End of variables declaration

}
